]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: Make sure not to checkConnection on the wireless section
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 7 Aug 2013 10:44:38 +0000 (06:44 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 12 Aug 2013 14:08:18 +0000 (10:08 -0400)
As the wireless section does not contain checkConnection.

js/ui/status/network.js

index fc0f47bd1be8e942527176aed6da847c8a0d5ebd..751711823f536b84561c44eb1b69a81ae41c6e8a 100644 (file)
@@ -1571,9 +1571,10 @@ const NMApplet = new Lang.Class({
             this._vpnSection.checkConnection(connection);
         } else {
             let devices = this._devices[section].devices;
-            for (let i = 0; i < devices.length; i++) {
-                devices[i].checkConnection(connection);
-            }
+            devices.forEach(function(wrapper) {
+                if (wrapper instanceof NMConnectionSection)
+                    wrapper.checkConnection(connection);
+            });
         }
     },